#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

bool ascending(int a, int b) {//ASC
    return a < b;
}

bool descending(int a, int b) {//DESC
    return a > b;
}


void sort(int a[], int n, bool cmp(int, int)) {
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j <= n - i - 2; j++) {
            if (!cmp(a[j], a[j + 1])) {
                int t = a[j];
                a[j] = a[j + 1];
                a[j + 1] = t;
            }
        }

    }
}

int main() {
    int a[] = {1, 3, 5, 7, 9, 2, 4, 6, 8, 0};
    //sort(a, 10,ascending);
    sort(a, 10, descending);
    for (int i = 0; i < 10; i++) {
        cout << a[i] << " ";
    }
    return 0;
}